import Vue from 'vue'

//组件
//import Welcome from '@/page/welcome/welcome'
import Index from '@/page/index/index'
import Login from '@/page/login/login'
import GFJY from '@/page/index/list'
import Datalist from '@/page/kcjl/datalist'
import Formcontent from '@/page/kcjl/formcontent'
//法律法规
import FLFG from '@/page/law/lawlist'
import Lawdetail from '@/page/law/Lawdetail'
//视频查看
import SPCK from '@/page/video/videolist'

//办事指南
import BSZN from '@/page/guide/guidelist'
import Guidedetail from '@/page/guide/guidedetail'
//行业资讯
import HYZX from '@/page/industry/industrylist'
import Industrydetail from '@/page/industry/industrydetail'
//监管人员
import JGRY from '@/page/supervisor/supervisorlist'
import Supervisordetail from '@/page/supervisor/supervisordetail'
//通知公告
import TZGG from '@/page/publicNotice/publicNoticelist'
import PublicNoticedetail from '@/page/publicNotice/PublicNoticedetail'
//从业人员
import RYDA from '@/page/employees/employeeslist'
import Employeesadd from '@/page/employees/employeesadd'
import Employeesdetail from '@/page/employees/employeesdetail'
//个人中心
import GRZX from '@/page/personal/personallist'
//修改面
import  Changepsd from '@/page/personal/changepsd'

//每日检查
import Mrcjlist from '@/page/mrcj/mrcjlist'
import Mrcjlistdetail from '@/page/mrcj/mrcjlistdetail'
import Mrcjlistadd from '@/page/mrcj/mrcjlistadd'
import Mrcjlistupdate from '@/page/mrcj/mrcjlistupdate'



//废弃物管理
import Fqwgllist from '@/page/fqwgl/fqwgllist'
import Fqwgllistdetail from '@/page/fqwgl/fqwgllistdetail'
import Fqwgllistadd from '@/page/fqwgl/fqwgllistadd'
import Fqwgllistupdate from '@/page/fqwgl/Fqwgllistupdate'

//人员管理
import InstitutionPerson from '@/page/index/institutionPerson'

//出货记录
import Chjllist from '@/page/chjl/chjllist'
import Chjllistdetail from '@/page/chjl/chjllistdetail'
import Chjllistadd from '@/page/chjl/chjllistadd'
import Chjllistupdate from '@/page/chjl/chjllistupdate'

//清新消毒
import Qxxdjlist from '@/page/qxxd/qxxdjlist'
import Qxxdlistdetail from '@/page/qxxd/qxxdlistdetail'
import Qxxdlistadd from '@/page/qxxd/qxxdlistadd'
import Qxxdlistupdate from '@/page/qxxd/qxxdlistupdate'

//五病调离
import Wbdllist from '@/page/wbdl/wbdllist'
import Wbdllistdetail from '@/page/wbdl/wbdllistdetail'
import Wbdllistadd from '@/page/wbdl/wbdllistadd'
import Wbdllistupdate from '@/page/wbdl/wbdllistupdate'

//食品留样
import Splylist from '@/page/sply/splylist'
import Splylistdetail from '@/page/sply/splylistdetail'
import Splylistadd from '@/page/sply/splylistadd'
import Splylistupdate from '@/page/sply/splylistupdate'
//进货记录
import Jhjllist from '@/page/jhjl/jhjllist'
import Jhjllistdetail from '@/page/jhjl/jhjllistdetail'
import Jhjllistadd from '@/page/jhjl/jhjllistadd'
import Jhjllistupdate from '@/page/jhjl/Jhjllistupdate'


/**************************************台账配置************************************/
//ledger
import TZPZ from '@/page/Ledger/list'
import JBQKBAlist from '@/page/Ledger/addlist'

import SPLB from '@/page/Ledger/foodtype/foodtypelist'
import Foodtypelistdetail from '@/page/Ledger/foodtype/foodtypelistdetail'
import Foodtypeadd from '@/page/Ledger/foodtype/foodtypeadd'
//食品名称
import SPMC from '@/page/Ledger/foodname/foodnamelist'
import Foodnamelistdetail from '@/page/Ledger/foodname/foodnamelistdetail'
import Foodnameadd from '@/page/Ledger/foodname/foodnameadd'
//管理人员
import GLRY from '@/page/Ledger/management/managementlist'
import Managementdetail from '@/page/Ledger/management/managementdetail'
import Managementadd from '@/page/Ledger/management/Managementadd'
//供应商
import GYS from '@/page/Ledger/supplier/supplierlist'
import Supplierdetail from '@/page/Ledger/supplier/supplierdetail'
import Supplieradd from '@/page/Ledger/supplier/supplieradd'
//设备名称
import CSSB from '@/page/Ledger/equipment/equipmentlist'
import Equipmentadd from '@/page/Ledger/equipment/equipmentadd'
import Equipmentdetail from '@/page/Ledger/equipment/equipmentdetail'

import QYDA from '@/page/Fileinfo/fileinfo'

//信用档案
import XYDA from '@/page/credit/creditlist'
import JBXX from '@/page/credit/basicinfo/detail'
import LHDJ from '@/page/credit/quantinfo/detail'
import KJJL from '@/page/credit/fastcheck/list'
import KJJLdetail from '@/page/credit/fastcheck/detail'
import CJJL from '@/page/credit/sampling/list'
import CJJLdetail from '@/page/credit/sampling/detail'


import RCJCJL from '@/page/credit/dailycheck/list'
import RCJCJLdetail from '@/page/credit/dailycheck/detail'
/*8个文书检查 */
import Supervisiondetail1 from '@/page/credit/dailycheck/supervisiondetail1'
import Supervisiondetailpoint from '@/page/credit/dailycheck/supervisiondetailpoint'
import Supervisiondetail2 from '@/page/credit/dailycheck/supervisiondetail2'
import Supervisiondetail3 from '@/page/credit/dailycheck/supervisiondetail3'
import Supervisiondetail4 from '@/page/credit/dailycheck/supervisiondetail4'
import Supervisiondetail5 from '@/page/credit/dailycheck/supervisiondetail5'
import Supervisiondetail6 from '@/page/credit/dailycheck/supervisiondetail6'
import Supervisiondetail7 from '@/page/credit/dailycheck/supervisiondetail7'


import XZYTJL from '@/page/credit/interview/list'
import XZCFJL from '@/page/credit/sanction/list'
import XZBZJL from '@/page/credit/commend/list'




//内容页展示区域
const root = Vue.component('root', {
  template: '<router-view></router-view>'
});

let routes = [
 

  { 
    path: '/login',
    name: 'Login',
    component: Login,
    meta: {
      requiresAuth: true,
      hidden: true
    }
  }, {
    path: '/',
    component: root,
    meta: {
      requiresAuth: true
    },
    children: [
    {
      path: 'addlist',
      name: 'JBQKBAlist',
      component: JBQKBAlist,
    },
    {
      path: 'index',
      name: 'Index',
      component: Index,
    },
    {//信用档案
      path: 'detail',
      name: 'JBXX',
      component: JBXX,
    },{
      path: 'creditlist',
      name: 'XYDA',
      component: XYDA,
    },{
      path: 'lhdjdetail',
      name: 'LHDJ',
      component: LHDJ,
    },{
      path: 'kjlllist',
      name: 'KJJL',
      component: KJJL,
    },{
      path: 'kjlldetail',
      name: 'KJJLdetail',
      component: KJJLdetail,
    },{
      path: 'cjjllist',
      name: 'CJJL',
      component: CJJL,
    },{
      path: 'cjjldetail',
      name: 'CJJLdetail',
      component: CJJLdetail,
    },{
      path: 'rcjcjllist',
      name: 'RCJCJL',
      component: RCJCJL,
    },{
      path: 'rcjcjldetail',
      name: 'RCJCJLdetail',
      component: RCJCJLdetail,
    },{
      path: 'supervisiondetail1',
      name: 'Supervisiondetail1',
      component:Supervisiondetail1,
    },{
      path: 'Supervisiondetailpoint',
      name: 'Supervisiondetailpoint',
      component:Supervisiondetailpoint,
    },{
      path: 'supervisiondetail2',
      name: 'Supervisiondetail2',
      component:Supervisiondetail2,
    },{
      path: 'supervisiondetail3',
      name: 'Supervisiondetail3',
      component:Supervisiondetail3,
    },{
      path: 'supervisiondetail4',
      name: 'Supervisiondetail4',
      component:Supervisiondetail4,
    },{
      path: 'supervisiondetail5',
      name: 'Supervisiondetail5',
      component:Supervisiondetail5,
    },{
      path: 'supervisiondetail6',
      name: 'Supervisiondetail6',
      component:Supervisiondetail6,
    },{
      path: 'supervisiondetail7',
      name: 'Supervisiondetail7',
      component:Supervisiondetail7,
    },{
      path: 'xzytjllist',
      name: 'XZYTJL',
      component: XZYTJL,
    },{
      path: 'XZCFJLlist',
      name: 'XZCFJL',
      component: XZCFJL,
    },{
      path: 'XZBZJLlist',
      name: 'XZBZJL',
      component: XZBZJL,
    },
    {//法律法规
      path: 'lawlist',
      name: 'FLFG',
      component: FLFG,
    },
    {
      path: 'lawdetail',
      name: 'Lawdetail',
      component: Lawdetail,
    },{
      //视频查看
       path: 'videolist',
       name: 'SPCK',
       component: SPCK,
    },{
      //个人中心
       path: 'personallist',
       name: 'GRZX',
       component: GRZX,
    },{
       path: 'changepsd',
       name: 'Changepsd',
       component:Changepsd,
      
    },{//办事指南
      path: 'guidelist',
      name: 'BSZN',
      component: BSZN,
    },
    {
      path: 'guidedetail',
      name: 'Guidedetail',
      component: Guidedetail,
    },{//行业资讯
      path: 'industrylist',
      name: 'HYZX',
      component: HYZX,
    },
    {
      path: 'industrydetail',
      name: 'Industrydetail',
      component: Industrydetail,
    },{
      //从业人员
      path: 'employeeslist',
      name: 'RYDA',
      component: RYDA,
    },{
      path:'employeesadd',
      name: 'Employeesadd',
      component: Employeesadd,
    },{
      path:'employeesdetail',
      name: 'Employeesdetail',
      component: Employeesdetail,
    },{
      //监管人员JGRY
      path: 'supervisor',
      name: 'JGRY',
      component: JGRY,
    },{
      path: 'supervisordetail',
      name: 'Supervisordetail',
      component: Supervisordetail,
    },{//通知公告
      path: 'publicNoticelist',
      name: 'TZGG',
      component: TZGG,
    },{
       path: 'publicNoticedetail',
       name: 'PublicNoticedetail',
       component: PublicNoticedetail,
    },{
      path: 'mrcjlist',
      name: 'Mrcjlist',
      component: Mrcjlist,
    }
    ,{
      path: 'list',
      name: 'GFJY',
      component: GFJY
    },{
      path: 'datalist',
      name: 'Datalist',
      component: Datalist
    },{
      path: 'formcontent',
      name: 'Formcontent',
      component: Formcontent
    },{
      path: 'mrcjlistdetail',
      name: 'Mrcjlistdetail',
      component: Mrcjlistdetail
    },{
      path: 'mrcjlistadd',
      name: 'Mrcjlistadd',
      component: Mrcjlistadd,
      meta: { keepAlive: true  }
    },{
      path: 'mrcjlistupdate',
      name: 'Mrcjlistupdate',
      component: Mrcjlistupdate,
    },{
      path: 'institutionPerson',
      name: 'InstitutionPerson',
      component: InstitutionPerson
    },{//废弃物管理
       path: 'fqwgllist',
      name: 'Fqwgllist',
      component: Fqwgllist
    },{
       path: 'fqwgllistdetail',
      name: 'Fqwgllistdetail',
      component: Fqwgllistdetail       
    },{
       path: 'fqwgllistadd',
      name: 'Fqwgllistadd',
      component: Fqwgllistadd       
    },{
      path: 'fqwgllistupdate',
      name: 'Fqwgllistupdate',
      component: Fqwgllistupdate       
    },{//出货记录
       path: 'chjllist',
      name: 'Chjllist',
      component: Chjllist
    },{
      path: 'chjllistdetail',
      name: 'Chjllistdetail',
      component: Chjllistdetail
    },{
      path: 'chjllistadd',
      name: 'Chjllistadd',
      component: Chjllistadd
    },{
      path: 'chjllistupdate',
      name: 'Chjllistupdate',
      component: Chjllistupdate
    },{
      path: 'qxxdjlist',
      name: 'Qxxdjlist',
      component: Qxxdjlist
    },{
      path: 'qxxdlistdetail',
      name: 'Qxxdlistdetail',
      component: Qxxdlistdetail
    },{
      path: 'qxxdlistadd',
      name: 'Qxxdlistadd',
      component: Qxxdlistadd
    },{
      path: 'qxxdlistupdate',
      name: 'Qxxdlistupdate',
      component: Qxxdlistupdate
    },{//五病调离
      path: 'wbdllist',
      name: 'Wbdllist',
      component: Wbdllist
    },{
      path: 'wbdllistdetail',
      name: 'Wbdllistdetail',
      component: Wbdllistdetail
    },{
      path: 'wbdllistadd',
      name: 'Wbdllistadd',
      component: Wbdllistadd
    },{
      path: 'wbdllistupdate',
      name: 'Wbdllistupdate',
      component: Wbdllistupdate
    },{//食品留样
      path: 'splylist',
      name: 'Splylist',
      component: Splylist
    },{
      path: 'splylistdetail',
      name: 'Splylistdetail',
      component: Splylistdetail
    },{
      path: 'splylistadd',
      name: 'Splylistadd',
      component: Splylistadd
    },{
      path: 'splylistupdate',
      name: 'Splylistupdate',
      component: Splylistupdate
    },{//进货记录
      path: 'jhjllist',
      name: 'Jhjllist',
      component: Jhjllist
    },{//进货记录
      path: 'jhjllistdetail',
      name: 'Jhjllistdetail',
      component: Jhjllistdetail
    },{//进货记录
      path: 'jhjllistadd',
      name: 'Jhjllistadd',
      component: Jhjllistadd
    },{//进货记录
      path: 'jhjllistupdate',
      name: 'Jhjllistupdate',
      component: Jhjllistupdate
    },{//台账配置
      path: 'ledger',
      name: 'TZPZ',
      component: TZPZ,
    },{//食品类别
      path: 'foodtypelist',
      name: 'SPLB',
      component: SPLB,
    },{
      path: 'foodtypelistdetail',
      name: 'Foodtypelistdetail',
      component: Foodtypelistdetail,
    },{
      path: 'foodtypeadd',
      name: 'Foodtypeadd',
      component:Foodtypeadd,
    },{//食品名称
      path: 'foodnamelist',
      name: 'SPMC',
      component:SPMC,
    },{
      path: 'foodnamelistdetail',
      name: 'Foodnamelistdetail',
      component: Foodnamelistdetail,
    },{
      path: 'foodnameadd',
      name: 'Foodnameadd',
      component: Foodnameadd,
    },{//管理人员
      path: 'managementlist',
      name: 'GLRY',
      component: GLRY,
    },{
      path: 'managementdetail',
      name: 'Managementdetail',
      component: Managementdetail,
    },{
      path: 'managementadd',
      name: 'Managementadd',
      component: Managementadd,
    },{//供应商
      path: 'supplierlist',
      name: 'GYS',
      component: GYS,
    },{
      path: 'supplierdetail',
      name: 'Supplierdetail',
      component: Supplierdetail,
    },{
      path: 'supplieradd',
      name: 'Supplieradd',
      component: Supplieradd,
    },{//场所设备
      path: 'equipmentlist',
      name: 'CSSB',
      component: CSSB,
    },{
      path: 'equipmentdetail',
      name: 'Equipmentdetail',
      component:Equipmentdetail,
    },{
      path: 'equipmentadd',
      name: 'Equipmentadd',
      component: Equipmentadd,
    },{//档案信息
      path: 'fileinfo',
      name: 'QYDA',
      component: QYDA,
    }
  ]
  }
]


routes[1].children.forEach(route => {
  if (route.children) {
    if (!route.meta) {
      route.meta = {};
    }
    route.meta.children = route.children;
  }
});

export default routes;

